<?php if (!defined('THINK_PATH')) exit(); /*a:7:{s:71:"E:\www\paobanglang\nav/../application/admin\view\express\losemoney.html";i:1510217457;s:63:"E:\www\paobanglang\nav/../application/admin\view\Main\menu.html";i:1514443605;s:67:"E:\www\paobanglang\nav/../application/admin\view\Public\header.html";i:1512184095;s:65:"E:\www\paobanglang\nav/../application/admin\view\public\city.html";i:1512292211;s:66:"E:\www\paobanglang\nav/../application/admin\view\public\pages.html";i:1507520616;s:70:"E:\www\paobanglang\nav/../application/admin\view\Main\menu_footer.html";i:1510984673;s:67:"E:\www\paobanglang\nav/../application/admin\view\Public\footer.html";i:1516863870;}*/ ?>
<!doctype html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
    <title>后台管理</title>
   
    <link rel="stylesheet" href="__STATIC__/admin/css/amazeui.min.css" />
    <link rel="stylesheet" href="__STATIC__/admin/css/admin.css">
    <link rel="stylesheet" href="__STATIC__/admin/css/style.css">
    <link rel="stylesheet" href="__STATIC__/admin/css/pintuer.css">
    <link rel="stylesheet" href="__STATIC__/admin/css/app.css">
    <script src="__STATIC__/admin/js/jquery.min.js"></script>
    <script src="__STATIC__/admin/js/amazeui.min.js"></script>
    <script src="__STATIC__/admin/js/pintuer.js"></script>
    <script src="__STATIC__/admin/js/app.js"></script>
    <script type="text/javascript" src="__STATIC__/admin/layer/layer.js"></script>
    <script type="text/javascript" src="__STATIC__/admin/laydate/laydate.js"></script>
    <script type="text/javascript" src="__STATIC__/admin/laytpl/laytpl.js"></script>
</head>
<body>
<header class="am-topbar am-topbar-inverse admin-header">
    <div class="am-topbar-brand">
        <a href="javascript:;" class="tpl-logo">
            <img src="__STATIC__/admin/images/logo.png">
        </a>
    </div>
    <div class="am-icon-list tpl-header-nav-hover-ico am-fl am-margin-right"></div>
    <button class="am-topbar-btn am-topbar-toggle am-btn am-btn-sm am-btn-success am-show-sm-only" data-am-collapse="{target: '#topbar-collapse'}"><span class="am-sr-only">导航切换</span> <span class="am-icon-bars"></span></button>
    <div class="am-collapse am-topbar-collapse" id="topbar-collapse">
        <ul class="am-nav am-nav-pills am-topbar-nav am-topbar-right admin-header-list tpl-header-list">
            <!--<li title="清除缓存">
                <a href="javascript:clear_cache()" class="tpl-header-list-link">
                    清除缓存
                </a>
            </li>-->
            <li title="注销登录">
                <a href="<?php echo url('admin/login/quit'); ?>" class="tpl-header-list-link">
                    <span class="am-icon-sign-out tpl-header-list-ico-out-size"></span>
                </a>
            </li>
        </ul>
    </div>
</header>
<div class="tpl-page-container tpl-page-header-fixed">
    <div class="tpl-left-nav tpl-left-nav-hover" style="margin-left: -10px">
        <div class="tpl-left-nav-title">
            导航列表
        </div>
        <div class="tpl-left-nav-list">
            <ul class="tpl-left-nav-menu">
                <?php foreach($menu_list as $menu): ?>
                    <li class="tpl-left-nav-item">
                        <?php 
                            $b = 0;
                            foreach($menu['child'] as $k => $v){
                                if (strtolower(request()->controller().'/'.request()->action()) == $v['url']){
                                    $b = 1;
                                    break;
                                }
                            }
                           //dump($menu['child']);
                         ?>
                        <a class="nav-link tpl-left-nav-link-list" <?php if($b == 1): ?> class="active" <?php endif; ?>>
                            <i class="<?php echo $menu['icon']; ?>"></i>
                            <span><?php echo $menu['name']; ?></span>
                            <?php if(count($menu['child']) > 0): ?>
                                <i class="am-icon-angle-right tpl-left-nav-more-ico am-fr am-margin-right tpl-left-nav-more-ico-rotate"></i>
                            <?php endif; ?>
                        </a>
                        <?php if(count($menu['child']) > 0): ?>
                            <ul class="tpl-left-nav-sub-menu" style="display:<?php if($b != 1): ?>none<?php else: ?>block<?php endif; ?>;">
                                <li>
                                    <?php foreach($menu['child'] as $menu_child): ?>
                                        <a href="__ROOT__/admin/<?php echo $menu_child['url']; ?>" id="<?php echo request()->controller(); ?>/<?php echo request()->action(); ?>" <?php if(strtolower(request()->controller().'/'.request()->action()) == $menu_child['url']): ?> class="active"<?php endif; ?>>
                                            <i class="am-icon-angle-right"></i>
                                            <span><?php echo $menu_child['name']; ?></span>
                                            <!--<i class="am-icon-star tpl-left-nav-content-ico am-fr am-margin-right"></i>-->
                                        </a>
                                    <?php endforeach; ?>
                                </li>
                            </ul>
                        <?php endif; ?>
                    </li>
                <?php endforeach; ?>
            </ul>
        </div>
    </div>
</div>

<style>
    .am-dropdown{
        width: 100%;
        padding-left: 30px;
        margin-bottom: 10px;
    }
    .am-dropdown div{
        color: #000;
    }
</style>
<div class="tpl-content-wrapper">
<form method="post">
    <div class="panel admin-panel" style="background: #fff">
        <div class="panel-head"><strong><?php echo lang('currency')['list']; ?></strong></div>
        <!--<div class="padding border-bottom">
            <input type="button" class="button button-small checkall" name="checkall" checkfor="id" value="<?php echo lang('currency')['all_select']; ?>" />
            &lt;!&ndash;<a id="select_del" type="button" class="button button-small border-red" href="#" />拒绝</a>&ndash;&gt;
        </div>-->
        <div class="padding border-bottom">
            <script>
                //city 参数和回调
                var pid="<?php echo input('get.pid'); ?>";
                var cid="<?php echo input('get.cid'); ?>";
                var aid="<?php echo input('get.aid'); ?>";
                var selectc = true;
                var selecta = true;
                function select_p(){
                    return false;
                }
                function select_c(){
                    return false;
                }
                function select_a(){
                    location.href="?pid="+pid+"&cid="+cid+"&aid="+aid;
                }
            </script>
            选择城市：<?php if(input('session.type') == 'province' || input('session.type') == 'all'): ?>
<select id="province" onchange="pchange(this.value)" name="pid" class="input input-auto" >
	<option value="">请选择</option>
</select>
<?php endif; if(input('session.type') == 'province' ||  input('session.type') == 'city' || input('session.type') == 'all'): ?>
<select id="city" onchange="cchange(this.value)" name="cid" class="input input-auto hidden" >
	<option value="">请选择</option>
</select>
<?php endif; ?>
<select id="area" onchange="achange(this.value)" name="aid" class="input input-auto hidden" >
	<option value="">请选择</option>
</select>
<script id="province_list_tpl" type="text/html">
	{{# for(var i = 0, len = d.data.length; i < len; i++){ }}
	<option {{# if(d.data[i].id==pid){ }}selected{{#}}} value="{{ d.data[i].id }}">{{ d.data[i].name }}</option>
	{{# } }}
</script>
<script id="city_list_tpl" type="text/html">
	{{# for(var i = 0, len = d.data.length; i < len; i++){ }}
	<option {{# if(d.data[i].id==cid){ }}selected{{#}}} value="{{ d.data[i].id }}">{{ d.data[i].name }}</option>
	{{# } }}
</script>
<script id="area_list_tpl" type="text/html">
	{{# for(var i = 0, len = d.data.length; i < len; i++){ }}
	<option {{# if(d.data[i].id==aid){ }}selected{{#}}} value="{{ d.data[i].id }}">{{ d.data[i].name }}</option>
	{{# } }}
</script>
<script>
    var func = false;
    $('select').click(function(){
        func = true;
    });
    if(selectc) {
        $('[name=cid]').removeClass('hidden');
    }
    if(selecta){
        $('[name=aid]').removeClass('hidden');
    }
    if('<?php echo input("session.type"); ?>' === 'province' || '<?php echo input("session.type"); ?>' === 'all') {
        $.getJSON('__ROOT__/admin/city/ajax_get?type=province', {}, function (res) {
            var tpl = $("#province_list_tpl").html();
            laytpl(tpl).render(res, function (render) {
                $("#province").html('<option value="">请选择</option>' + render);
            });
            if (pid != '' && pid != 0) {
                $('[name=pid]').change();
            }
        });
    }else if('<?php echo input("session.type"); ?>' === 'city'){
        val = '<?php echo input("session.aid"); ?>';
        if(selectc){
            $.getJSON('__ROOT__/admin/city/ajax_get?type=city&id='+val, {}, function(res){
                var tpl = $("#city_list_tpl").html();
                laytpl(tpl).render(res, function(render){
                    $("#city").html('<option value="">请选择</option>' + render);
                    $("#city").val(cid);
                    $("#city").change();
                });
            });
        }
    }else if('<?php echo input("session.type"); ?>' === 'area'){
        val = '<?php echo input("session.aid"); ?>';
//        if(selecta && aid){
            $.getJSON('__ROOT__/admin/city/ajax_get?type=area&nofather=ok&id='+val, {}, function(res){
                var tpl = $("#area_list_tpl").html();
                laytpl(tpl).render(res, function(render){
                    $("#area").html('<option value="">请选择</option>'+render);
                });
            });
//        }
    }
    function pchange(val) {
        pid = val;
        if(selectc){
            $.getJSON('__ROOT__/admin/city/ajax_get?type=city&id='+pid, {}, function(res){
                var tpl = $("#city_list_tpl").html();
                laytpl(tpl).render(res, function(render){
                    $("#city").html('<option value="">请选择</option>'+render);
                });
                if(selectc === true){
                    if(cid !== '' && cid !== 0){
                        $('[name=cid]').change();
                    }
                }
            });
        }
        if(func){
            select_p();
        }
    }
    function cchange(val) {
        cid = val;
        if(selecta && cid){
            $.getJSON('__ROOT__/admin/city/ajax_get?type=area&id='+cid, {}, function(res){
                var tpl = $("#area_list_tpl").html();
                laytpl(tpl).render(res, function(render){
                    $("#area").html('<option value="">请选择</option>'+render);
                });
            });
        }
        if(func){
            select_c();
        }
    }
    function achange(val) {
        aid = val;
        $('[name=aid]').removeClass('hidden');
        if(func){
            select_a();
        }
    }
</script>
        <table class="am-table am-table-striped am-table-hover table-main">
            <tr>
                <th width="50"></th>
                <th width="100">用户</th>
                <th width="100">真实姓名</th>
                <th width="100">支付宝账号</th>
                <th width="100">金额</th>
                <th width="100">是否打款</th>
                <th width="200">申请日期</th>
                <th width="100">操作</th>
            </tr>
            <?php if(is_array($data) || $data instanceof \think\Collection || $data instanceof \think\Paginator): $i = 0; $__LIST__ = $data;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$red): $mod = ($i % 2 );++$i;?>
                <tr>
                    <td >
                        <input type="checkbox" name="id" value="<?php echo $red['id']; ?>" />
                    </td>
                    <td style="line-height:40px"><?php echo $red['username']; ?></td>
                    <td style="line-height:40px"><?php echo $red['truename']; ?></td>
                    <td style="line-height:40px"><?php echo $red['account']; ?></td>
                    <td style="line-height: 40px">￥<?php echo $red['money']; ?></td>
                    <td style="line-height:40px"><?php if($red['status'] == 2): ?>待处理<?php elseif($red['status'] == 1): ?><span class="icon-check text-sub"><?php echo lang('currency')['status_1']; ?></span><?php else: ?><span style="color: red">已拒绝</span><?php endif; ?></td>
                    <td style="line-height:40px"><?php echo date('Y-m-d H:i:s',$red['losttime']); ?></td>
                    <td style="line-height:40px">
                        <a class="button border-blue button-little" <?php if($red['status'] != 2): ?>disabled<?php endif; if($red['status'] == 2): ?>href="javascript:set_status('./losemoney_edit?id=<?php echo $red['id']; ?>&status=<?php echo $red['status']; ?>&page=<?php echo input('get.page'); ?>&uid=<?php echo $red['uid']; ?>')"<?php endif; ?>>确认打款</a>
                        <a class="button border-yellow button-little" <?php if($red['status'] != 2): ?>disabled<?php endif; if($red['status'] == 2): ?>href="./losemoney_del.html?id=<?php echo $red['id']; ?>&page=<?php echo input('get.page'); ?>&uid=<?php echo $red['uid']; ?>" onclick="if(confirm('拒绝?')){return true;}return false;"<?php endif; ?>>拒绝提现</a>
                    </td>
                </tr>
            <?php endforeach; endif; else: echo "" ;endif; ?>
        </table>
        <?php if($pages['pagetotal'] > 1): 
		$get_arr = request()->get();
		$parameters = '';
		if(count($get_arr) > 0){
			foreach($get_arr as $k => $v){
				if($k != 'page'){
					$parameters .= '&'.$k.'='.$v;
				}
			}
		}
	 ?>
	<div class="am-cf" style="margin-right: 20px;">
		<div class="am-fr">
			<ul class="am-pagination tpl-pagination">
				<li><a href="#">共<?php echo $pages['total']; ?>条数据</a></li>
				<?php if($pages['page'] > 1): ?>
					<li><a href="?page=1<?php echo $parameters; ?>">«</a></li>
				<?php endif; $__FOR_START_18701__=$pages['page']-2;$__FOR_END_18701__=$pages['page']+3;for($i=$__FOR_START_18701__;$i < $__FOR_END_18701__;$i+=1){ if($i > 0 && $i <= $pages['pagetotal']): ?>
						<li <?php if($pages['page'] == $i): ?>class="am-active"<?php endif; ?>>
							<a href="?page=<?php echo $i; ?><?php echo $parameters; ?>"><?php echo $i; ?></a>
						</li>
					<?php endif; } if($pages['page'] < $pages['pagetotal']): ?>
					<li><a href="?page=<?php echo $pages['pagetotal']; ?><?php echo $parameters; ?>">»</a></li>
				<?php endif; ?>
			</ul>
		</div>
	</div>
<?php endif; ?>

    </div>
</form>
<script>
    $('#select_del').click(function(){
        var str="";
        $("input:checkbox[name=id]:checked").each(function(){
            str+=$(this).val()+",";
        });
        if(str!=''){
            if(confirm('拒绝')){location.href='__URL__/losemoney_del.html?id='+str+"&page=<?php echo input('get.page'); ?>";}
        }
    });
    function set_status(url){
        if(confirm('请确认您已手动将提现金额转账至商户支付宝账户中')){
            location = url;
        }
    }
</script>
</div>
<script src="__STATIC__/admin/js/jquery.min.js"></script>
<script src="__STATIC__/admin/js/amazeui.min.js"></script>
<script src="__STATIC__/admin/js/pintuer.js"></script>
<script src="__STATIC__/admin/js/app.js"></script>
<script type="text/javascript" src="__STATIC__/admin/layer/layer.js"></script>
<script type="text/javascript" src="__STATIC__/admin/layer/extend/layer.ext.js"></script>
<script type="text/javascript" src="__STATIC__/admin/laydate/laydate.js"></script>
<script type="text/javascript" src="__STATIC__/admin/laytpl/laytpl.js"></script>
<script>
    $('.upload').on('click',function (){
            var id = $(this).attr('data-id');
            upload(id);
        }
    );
    function upload(id){
        layer.open({
            type:2,
            title:false,
            area: ['70%', '90%'],
            offset: '5%',
            content: "<?php echo url('/admin/material'); ?>?id="+id
        });
    }
</script>
<?php if(request()->isPost()): ?>
<script>
    layer.msg('操作完成！');
    setTimeout(function (){
        parent.window.location.href = parent.window.location.href;
    },800);
</script>
<?php endif; ?>
</body>
</html>